﻿using RpcSync.DAL;
using RpcSync.Model;
using RpcSync.Model.DB;

namespace RpcSync.Collect.Collect
{
    internal class AccreditTokenCollect : IAccreditTokenCollect
    {
        private IAccreditTokenDAL _AccreditToken;

        public AccreditTokenCollect(IAccreditTokenDAL accreditToken)
        {
            this._AccreditToken = accreditToken;
        }

        public void Add(AccreditTokenModel add)
        {
            _AccreditToken.Add(add);
        }

        public bool Delete(Guid id)
        {
            return _AccreditToken.Delete(id);
        }

        public AccreditTokenDatum Get(Guid id)
        {
            return _AccreditToken.Get(id);
        }

        public Guid[] GetSubId(Guid accreditId)
        {
            return _AccreditToken.GetSubId(accreditId);
        }

        public bool Set(Guid accreditId, AccreditTokenSet set)
        {
            return _AccreditToken.Set(accreditId, set);
        }

        public void SetOverTime(Guid accreditId, DateTime overTime)
        {
            _AccreditToken.SetOverTime(accreditId, overTime);
        }
    }
}
